﻿using System;
using System.Collections.Generic;
using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using Moq;

namespace Opo.Perspective.Core
{
    [TestFixture]
    public class PhoneNumberTests
    {
        string _number;
        string _type;

        [TestFixtureSetUp]
        public void Setup()
        {
            _number = "123456789";
            _type = "home";
        }

        [TestFixtureTearDown]
        public void Teardown()
        {

        }

        [Test]
        public void CanCreatePhoneNumber()
        {
            PhoneNumber phoneNumber = new PhoneNumber(_number, _type);

            Assert.That(phoneNumber.Number, Is.EqualTo(_number));
            Assert.That(phoneNumber.Type, Is.EqualTo(_type));
        }

        [Test]
        public void WritesProperToString()
        {
            PhoneNumber phoneNumber = new PhoneNumber(_number, _type);

            Assert.That(phoneNumber.ToString(), Is.EqualTo(String.Format("{0} ({1})", _number, _type)));
        }
    }
}
